1. Field of the Invention
The present invention relates to a control method of a shape measuring apparatus.
2. Description of Related Art
Shape measuring apparatuses measuring a shape of a measured object by performing a scanning displacement of a stylus tip along a surface of the measured object are known (see, for example, Japanese Patent Laid-open Publication No. 2008-241420). The apparatus described in Japanese Patent Laid-open Publication No. 2008-241420 first converts design value based on CAD data or the like (for example, NURBS (Non-Uniform Rational B-Spline) data) into polynomial curves of a predetermined degree. In this example, a cubic function is used as the polynomial and is referred to as PCC curves (Parametric Cubic Curves). Based on the PCC curves, a route for measuring a work piece is generated. Further, a divided PCC curve is generated by dividing PCC curves. By calculating a speed curve from the divided PCC curve, a displacement speed of a probe (displacement vector) is calculated. (For example, based on a curvature and the like of each segment of the divided PCC curve, the displacement speed (displacement vector) of the probe is set.) By displacing the probe based on the calculated displacement speed, the stylus tip is displaced scanning the surface of the measured object (passive nominal scanning measurement).
Furthermore, a method of taking scanning measurement during a track correction is also known in which a depression correction vector is calculated continuously so as to keep an amount of depression of the probe constant (Japanese Patent Laid-open Publication No. 2013-238573). Nominal scanning such as in this example is referred to as an “active nominal scanning measurement.”
After scanning measurements are performed at measurement positions, the probe is separated from the work piece. Then, when all measurements are completed, the probe is returned to an initial standby position. Alternatively, if a subsequent measurement position exists, the method continues and displaces the probe to the next measurement starting position. An operation separating the probe from the work piece is referred to as a retraction.
First, a retraction direction Dr is obtained from a sensor output of the probe. In other words, a normal direction of a measured surface is found based on the sensor output of the probe. The normal direction is the retraction direction Dr. A retraction length LR is given as a designated retraction length LR in advance. For example, the designated retraction length LR is given as 4 mm. When the next displacement is performed, the designated retraction length LR needs to have an amount of separation between the probe and the work piece sufficient to secure safety. On the other hand, the amount must not be too large such that the probe and the work piece come in contact during the retraction. When the designated retraction length LR is too large, the probe may contact an opposing surface of the work piece during the retraction. Whether the designated retraction length LR is appropriate may be confirmed based on design data of the work piece (such as CAD data), for example.
In a parts program of the scanning measurement, when the scanning measurement reaches an end point, “retraction” is instructed (programmed) as the next command. Therefore, when the scanning measurement reaches the end point, the retraction direction Dr is obtained from the sensor output and the retraction is performed from the measured surface with the designated retraction length LR. When the probe is separated from the measured surface with the retraction, the probe is displaced to the coordinates of the next designated destination.
The retraction is executed as mentioned above, however, an error has often occurred when the work piece and the probe come in contact during the retraction. One of the reasons is that an error exists between the design value and the actual work piece. When the work piece and the probe come in contact during the retraction, in order to avoid damage to the probe and the work piece, the retraction instantly makes an emergency stop at the time when the contact is detected and notifies a user of the occurrence of an abnormality. However, when such emergency stops occur often, measurement efficiency decreases. When an emergency stop occurs, the user needs to release the error manually and, in addition, withdraw the probe to a safety position. This requires considerable specialized skill of the user.
Furthermore, in order to prevent the same error from occurring, the retraction length needs to be reset manually. However, such operation requires even more advanced specialized skill. Such operation is very troublesome work for the user and the measurement efficiency also decreases.